package com.kc.business.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * TODO
 * 商家类别
 *
 * @author zhangshuo
 * @version 1.0
 * @date 2020/9/11
 */
@Data
@Table(name = "kc_scenic_business_type")
public class BizScenicBusinessType implements Serializable {

    private static final long serialVersionUID = -690833592270441274L;
    @Id
    private Integer id;
    /** 商家类别名称 */
    @NotBlank(message = "名称称不能为空")
    private String typeName;
    /** 父级类别 */
    private Integer pid;
    /** 类别下商家数量，包括子类别 */
    private Integer num;
    /** 删除状态：1已删除，0未删除 */
    private Integer isDeleted;
    /** 排序 */
    @NotNull(message = "排序不能为空")
    private Integer sort;
    /** 子类别 */
    private List<BizScenicBusinessType> children = new ArrayList<BizScenicBusinessType>();
    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
}
